<!doctype html>
<html>
  <head>
    <meta charset="utf-8">
    <title>CodeMirror: msgenny mode</title>
    <link rel="stylesheet" href="../../lib/codemirror.css">
    <script src="../../lib/codemirror.js"></script>
    <script src="mscgen.js"></script>
    <style type="text/css">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>
  </head>
  <body>
    <h1>CodeMirror: msgenny mode</h1>

<div><textarea id="code">
# Sample msgenny program
# https://sverweij.github.io/mscgen_js for more samples

a -> b   : a -> b  (signal);
a => b   : a => b  (method);
b >> a   : b >> a  (return value);
a =>> b  : a =>> b (callback);
a -x b   : a -x b  (lost);
a :> b   : a :> b  (emphasis);
a .. b   : a .. b  (dotted);
a -- b   : "a -- b straight line";
a note a : a note a\n(note),
b box b  : b box b\n(action);
a rbox a : a rbox a\n(reference),
b abox b : b abox b\n(state/ condition);
|||      : ||| (empty row);
...      : ... (omitted row);
---      : --- (comment);
</textarea></div>

    <script>
      var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
        lineNumbers: true,
        mode: "msgenny",
      });
    </script>

    <p><strong>MIME types defined:</strong> <code>text/x-msgenny</code></p>
  </body>
</html>
